feat(content): add a versioned payload codec#142
Open
marcus-pousette wants to merge 1 commit into
Open
Conversation
marcus-pousette
force-pushed
the
image-payload-experiment
branch
from
July 12, 2026 14:40
0515495 to
a3384e8
Compare
marcus-pousette
marked this pull request as ready for review
July 12, 2026 14:41
marcus-pousette
force-pushed
the
image-payload-experiment
branch
from
July 13, 2026 15:01
a3384e8 to
68b7160
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds
@treecrdt/content, a small application-layer codec for storing typed content in TreeCRDT'sUint8Arraypayloads.TreeCRDT core stays media-agnostic. This package is an optional protocol above the byte payload API.
Fast paths
The raw text representation is deliberate, not a backward-compatibility layer: framing text as well would add bytes and another envelope path without improving type discrimination.
Safety
Uint8Arrayviews.Scope
This PR is only the reusable codec: 9 files, +346/-2.
Playground UI, remote-sync presets, benchmarks, and the 1 MB JPEG fixture are intentionally separate.
Validation